package models;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.math.BigDecimal;
import java.util.Date;
import play.db.jpa.Model;

@Entity
public class Transaction extends Model {
    public Date date;
    public String label;
    public BigDecimal amount;
    @ManyToOne
    public BankStatement statement;
    @ManyToOne
    public Account account;

    public Transaction(Account account, BankStatement statement, Date date, String label, BigDecimal amount) {
        this.account = account;
        this.statement = statement;
        this.date = date;
        this.label = label;
        this.amount = amount;
    }
}
